package com.meilele.biz.guoziyang;


import com.meilele.dao.guoziyang.SecDetailMapper;
import com.meilele.entity.guoziyang.SecDetail;

import com.meilele.entity.guoziyang.Seclaber;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class SecDetailBusiness {

    @Resource
    private SecDetailMapper secDetailMapper;


    public List<SecDetail> findAll(){
         return secDetailMapper.selectAll();
    }

    public List<SecDetail> findNew(){
        return  secDetailMapper.selectNew();
    }

    public  List<SecDetail> findOld(){return  secDetailMapper.selectOld();}

    public List<SecDetail> findAll1(int laberName){
        return secDetailMapper.findAll(laberName);
    }

  public int  saveDetail(SecDetail secDetail){
        return  secDetailMapper.insertSelective(secDetail);
  }
  /*
  laber detail、
  的中间表添加数据
   */
  public int saveDeLa (int laId,int deId){
      return secDetailMapper.insertDeLa(laId,deId);
    }
    /*
    删除一行数据
     */
    public int deleteDetail(int styleId){
       return secDetailMapper.deleteDetail(styleId);
    }
    public List<Seclaber> findById(int styleId){
        return secDetailMapper.findById2(styleId);
    }

    public  SecDetail selectById(int styleId){
        return secDetailMapper.selectById(styleId);
    }

    public int updateDetail(SecDetail secDetail){
        return  secDetailMapper.updateDetail(secDetail);
        }


}
